﻿{% extends 'admin/base.html' %}

{%load comm_extras %}

{% block head_soruce %}
<script type="text/javascript" src="/static/common/js/jquery.simplemodal.1.4.min.js"></script> 
<script type="text/javascript" src="/static/admin/js/admin_master.js"></script> 
<script type="text/javascript">
	function checkData(){
		var value = jQuery.trim($("#txtValue").val());
		if(value == ""){
			alert("简介不能为空");
			return false;
		}
		var url = "{%url admin-about-edit%}";
        var	data = {'value':value};
		$.ajax({
			url: url,
			type: 'post',
			dataType: 'json',
			data:data,
			success: function(result, textStatus){
				if(result){
					if(result.success){
						alert('保存成功');
					}else{
						alert(result.err_msg);
					}
				}else{
					alert('保存失败');
				}
			},
			error: function(xhr, textStatus, errorThrown){
			}
		});

		return false;
	}

</script>
{% endblock %}

{% block main_content %}

	<ul id="movie-form" class="form">
	    <li>
            <h1>修改公司简介</h1>
        </li>
		<li>
			<textarea id="txtValue" class="srctextarea" style="height:500px;width:800px">{{value}}</textarea>
        </li>
		<li>
			<br/>
			<input type="button" id="btnAddSec" value="保存" onclick="javascript:return checkData();" style="margin-left:750px"/>
		</li>
	</ul>

{% endblock %}
